package com.wrl.mmall.service;

import com.github.pagehelper.PageInfo;

import com.wrl.mmall.common.ServerResponse;
import com.wrl.mmall.pojo.Product;
import com.wrl.mmall.vo.ProductDetailVo;

public interface IProductService {

	//查看商品详情
	ServerResponse<ProductDetailVo> getProductDetail(Integer productId);
	//查看所有商品
	ServerResponse<PageInfo> getProductByKeywordCategory(String keyword, Integer categoryId, int pageNum, int pageSize, String orderBy);

	/* 后端 */
	//添加或修改商品
	ServerResponse saveOrUpdateProduct(Product product);
	//修改商品销售状态
	ServerResponse<String> setSaleStatus(Integer productId, Integer status);
	//获取商品详情
	ServerResponse<ProductDetailVo> manageProductDetail(Integer productId);
	//查询所有商品
	ServerResponse getProductList(int pageNum, int pageSize);
	//模糊查询
	ServerResponse searchProduct(String productName, Integer productId, int pageNum, int pageSize);
}
